<?php
$url = $this->page_url;
$parameterGet = $this->DbshopCommonFun()->dbshopRequesthelper();

if ($parameterGet != ""){
    $parameterGet = "?".$parameterGet;
}
//为了获取类似#这样的html定位符
$parameterGet .= ((isset($this->more) and !empty($this->more)) ? $this->more : '');
?>
<?php if ($this->pageCount): ?>
    <div class="pagination pull-right" style=" margin:0;">
        <ul>
            <?php if (isset($this->previous)): ?>
                <a href="<?php echo $url.'/1'; ?>"><?php echo $this->translate('首页'); ?></a></li>
                <a href="<?php echo $url.'/'.$this->previous.$parameterGet; ?>"><?php echo $this->translate('上一页'); ?></a>
            <?php else: ?>
                <span class="disabled" href="#"><?php echo $this->translate('首页'); ?></span>
                <span class="disabled" href="#"><?php echo $this->translate('上一页'); ?></span>
            <?php endif; ?>
            <?php foreach ($this->pagesInRange as $page): ?>
                <?php if ($page != $this->current): ?>
                    <a href="<?php echo $url.'/'.$page.$parameterGet; ?>">
                            <?php echo $page; ?>
                        </a></li>
                <?php else: ?>
                    <span class="active disabled" style="background-color: #ECECEC"><?php echo $page; ?></span>
                <?php endif; ?>
            <?php endforeach; ?>
            <?php if (isset($this->next)): ?>
                <a href="<?php echo $url.'/'.$this->next.$parameterGet; ?>"><?php echo $this->translate('下一页'); ?></a>
                <a href="<?php echo $url.'/'.$this->pageCount.$parameterGet; ?>"><?php echo $this->translate('末页'); ?></a>
            <?php else: ?>
                <span class="disabled" href="#"><?php echo $this->translate('下一页'); ?></span>
                <span class="disabled" href="#"><?php echo $this->translate('末页'); ?></span>
            <?php endif; ?>
        </ul>
    </div>
<?php endif; ?>
